package router

import (
	"github.com/gin-gonic/gin"
	jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
	"tuowei.com/app/admin/apis"
	"tuowei.com/common/actions"
)

func init() {
	routerCheckRole = append(routerCheckRole, sysTeachingPointRouter)
}

// 需认证的路由代码
func sysTeachingPointRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	api := apis.SysTeachingPoint{}
	r := v1.Group("/sys-teaching-point").Use(authMiddleware.MiddlewareFunc()).Use(actions.PermissionAction())
	{
		r.POST("addPoint", api.AddPoint)
		r.GET("list", api.List)
		r.DELETE("deletePoint", api.Delete)
		r.POST("updatePoint", api.UpdatePoint)
		r.GET("detail/:id", api.Detail)
	}

}
